import json

from werkzeug.security import generate_password_hash


def set_token(data):
    if type(data)!=type({"a":"b"}):
        raise TypeError
    data = json.dumps(data)
    token = generate_password_hash(data)
    return token

def get_token(data):

    return

def check_token(data,key,value):
    return